/* 
 * File:   ISubscriber.java
 * Author: Fating <xingon@163.com>
 *
 * Created on 2014年12月2日上午9:45:28 
 *
 * Copyright (c) 2014, www.vip.com All Rights Reserved. 
 */
package com.tc.vms.iface;

import com.tc.vms.SLA;
import com.tc.vms.consumer.SubQoS;

/**
 * It supplies detail-actions about the consumer,which supports acknowledge ,shutdown etc.
 */
public interface ISubscriber extends VmsService {
    /**
     * Adds a message handler for same messages.which loops incoming messages to handle.
     * So pay a attention to performance ,those callbacks aren't working in thread pool.
     *
     * @param callback
     */
    void registerListener(IVMSCallback callback);

    /**
     * suspend consuming message service
     */
    void suspend();

    /**
     * resume and continue consuming message
     */
    void resume();

    void setConsumingThreadNum(int threadNum);

    SLA slaOption();

    SubQoS qosOption();
}
